package com.hd.crdao.wrapper;

import com.hd.crdao.R;

/**
 * @author Administrator
 * @date 2017/12/11
 */

public class GpsDrawable {

    /**
     * 2、	已拔出
     * 3、	已超时
     * 5、	超出范围
     */
    public static final int ONLINE = 0;
    public static final int OFFLINE = 2;    //已经拔出
    public static final int TIMEOUT = 3;     //已超时
    public static final int BEYOND_AREA = 5;    //超出范围

   /* public enum GpsState {
        ONLINE,
        OFFLINE,
        ERROR,
        BEYOND_AREA
    }*/

    public static int getGpsDrawable(int state) {
        int init = 0;
        switch (state) {
            case ONLINE:
                init = R.drawable.loc_label_green;
                break;
            case OFFLINE:
                init = R.drawable.loc_label_red;

                break;
            case TIMEOUT:
                init = R.drawable.loc_label_gray;
                break;
            case BEYOND_AREA:
                init = R.drawable.loc_label_orange;
                break;
        }
        return init;
    }

}
